package com.oss.vo.oss.position;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.oss.config.formatter.BigDecimalFormatter;
import com.oss.vo.oss.StudentBaseVO;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Data
public class PositionManageSummaryVO extends StudentBaseVO {
    // ID
    private String id;
    // 持仓市值
    @BigDecimalFormatter(shape = JsonFormat.Shape.STRING, pattern = "#.####")
    private BigDecimal availableAmount;
    // 浮动盈亏
    @BigDecimalFormatter(shape = JsonFormat.Shape.STRING, pattern = "#.####")
    private BigDecimal floatingProfitLoss;
    // 品种合约
    private String instrumentCode;
    // 期权类型
    private String optionType;
    // 执行价格
    private BigDecimal strikePrice;
    // 买持仓
    private BigDecimal buyPosition;
    // 买均价
    @BigDecimalFormatter(shape = JsonFormat.Shape.STRING, pattern = "#.####")
    private BigDecimal buyAveragePrice;
    // 卖持仓
    private BigDecimal sellPosition;
    // 卖均价
    @BigDecimalFormatter(shape = JsonFormat.Shape.STRING, pattern = "#.####")
    private BigDecimal sellAveragePrice;
    // 今日结算价
    private BigDecimal todaySettlementPrice;
    // 昨日结算价
    private BigDecimal yesterdaySettlementPrice;
    // 最新价
    private BigDecimal lastPrice;
    // 交易单位
    private BigDecimal volumeMultiple;
    // 交易编号
    private String tradeCode;
    // 交易保证金
    private BigDecimal tradeMargin;
    // 持仓日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate positionDate;
    // 数据来源 0:推送 1:系统添加
    private Integer dataSource;
    private String remark;
    // 子集
    List<PositionManageSummaryVO> children;
}